#include "player.h"


player::player(void)
{
	
}
player::player(char sign, int xpos, int ypos) : collidable(sign, xpos, ypos,0)
{
	
}


player::~player(void)
{
}

 int player::animate(gameField* field) 
{
	int c;
	bool valid = false;
	LPDWORD read = 0;
	INPUT_RECORD buffer;
	DWORD length = 1;
	while (!valid)
	{
		c = getch();
		if (c == 0 || c == 224)
		{

			switch(c = getch()) {
			case 72:    // key up
				return 0x1003;
				break;
			case 80:    // key down
				return 0x1004;
				break;
			case 77:    // key right
				return 0x1002;
				break;
			case 75:    // key left
				return 0x1001;
				break;
			}
		}	
	}
	return 0;
}

 int player::animate(int i){
	 return 2;
 }


